title: “A Sample R Markdown Template”
author: Vivek Patil
email: patil@jepson.gonzaga.edu
date: 9/11/2014
abstract: The objective of this document’s template is to demonstrate some basics of the combination of R and markdown and how they can be knitted together using the knitr package (via the RStudio IDE) to produce beautiful docs/reports.
output:
pdf_document:
highlight: tango
fig_width: 7
fig_height: 6
fig_caption: true
fig_crop: true
toc: true
toc_depth: 3
number_sections: true

The options mentioned in the header of this Rmarkdown file (with extensions of .Rmd) above for a pdf document can be modified as well as supplemented by options for other document formats.(Please see the “Output Options” section of RStudio’s reference site at http://rmarkdown.rstudio.com/ for more information.) Did you notice that this thing was in bold and that the previous thing was a web link?

Lists

Numbered list

Material for this document has been heavily borrowed from several documents.(Notice how a numbered list is being created below.)

  1. Markdown cheatsheet at http://warpedvisions.org/projects/markdown-cheat-sheet.md.
  2. R markdown reference from R Studio’s site at http://rmarkdown.rstudio.com/
  3. Source 3
  4. Source 4

Bulleted list

As previously mentioned, the objectives of this document are two fold.

  • Learn the basics of markdown
  • Learn how R code and output can be interspersed with markdown to create reports/documents.
  • Another one
  • And yet another one

How can headers be defined?

The header used above can be created using a different approach, using a single hashtag (wasn’t that in italics?) to the left of the title of the header.

Header 1

Header 2

Header 3 ### (Hashes on right are optional and that means you can drop them unless you have all the time in the world)

Header 4

Header 5

Images

You can insert images in the document as well. For instance, if you have an image of a real apple in your working directory, then you can insert it in the document in the following manner.

This describes your picture when you hover your picture: In this case, it is a picture of a real apple

Tables

Header Header Right
Cell Cell $10
Cell Cell $20

Definition Lists

Bottled water : $ 1.25 : $ 1.55 (Large)

Milk Pop : $ 1.75